if __name__ == '__main__':
    row = 1
    while row <= 9:
        white = 1
        while white <= 9 - row:
            print("%s   %s   %2s" % (" ", " ", "  "), end=" ")
            white += 1

        column = 1
        while column <= row:
            print("%d * %d = %-2d" % (column, row, column * row), end=" ")
            column += 1
        print()
        row += 1
